export const debounce = (func, wait) => {
  let timeout
  return () => {
    if (timeout) {
      clearTimeout(timeout)
    }
    timeout = setTimeout(func, wait)
  }
}
